import { http } from '@/utils/http'

// 获取数据接口
export const getInterchangeList = (id: string, state: number) => {
  try {
    return http({
      method: 'GET',
      url: '/get/api/v1/develop/Interchanges',
      data: {
        u_id: id,
        state: state,
      },
    })
  } catch (err) {
    console.log(err)
  }
}

// 修改状态接口
export const updateInterchangeState = (id: string, state: number) => {
  try {
    return http({
      method: 'POST',
      url: '/post/api/v1/develop/accept',
      data: {
        i_id: id,
        state: state,
      },
    })
  } catch (err) {
    console.log(err)
  }
}
